home *** CD-ROM | disk | FTP | other *** search
/ CD School House 9 / CD School House 9.0 - Wayzata Technology (1994).iso / pc / dos / math / fsultra1 / ultradat.inc < prev    next >
Text File  |  1992-06-18  |  3KB  |  81 lines

  1. comment ! 
  2. FSU - ULTRA    The greatest random number generator that ever was
  3.         or ever will be.  Way beyond Super-Duper.
  4.         (Just kidding, but we think its a good one.)
  5.  
  6. Authors:    Arif Zaman (arif@stat.fsu.edu) and
  7.         George Marsaglia (geo@stat.fsu.edu).
  8.  
  9. Date:        27 May 1992
  10.  
  11. Version:    1.05
  12.  
  13. Copyright:    To obtain permission to incorporate this program into
  14.         any commercial product, please contact the authors at
  15.         the e-mail address given above or at
  16.  
  17.         Department of Statistics and
  18.         Supercomputer Computations Research Institute
  19.         Florida State University
  20.         Tallahassee, FL 32306.
  21.  
  22. See Also:    README        for a brief description
  23.         ULTRA.DOC    for a detailed description
  24.  
  25. -----------------------------------------------------------------------
  26. ;
  27. ; This set of constants is initialized to what their values would be
  28. ; if the command RINIT(1234567,7654321) were used. This way, forgetting
  29. ; to call RINIT poses no problems.
  30. ;
  31.   N equ 37              ; The number of 32 bit words in the table
  32.   N2 equ 24             ;  x(i) = x(i-N) - x(i-N2)
  33.  
  34. counterpoint    STRUC
  35.   c  dw 0               ; counter
  36.   p  dw ?               ; offset for pointer
  37.      dw ?               ; segment for pointer
  38.   x  dd N dup (?)       ; data
  39. ENDS
  40.  
  41. ; To save the state of the generator, all the data from here >>>
  42. swbstate equ this byte
  43.  
  44. swb32   counterpoint <,,seg(swb32)>
  45. swb16   counterpoint <,,seg(swb16)>
  46. swb8    counterpoint <,,seg(swb8) >
  47. swb1    counterpoint <,,seg(swb1) >
  48. org     $-4*N+32
  49.  
  50. swbseed dd  00D45D69Ah    ; Seed values for the SWB generator
  51.   dd  09DB73B1Ah, 0A84604E8h, 07C5F0CA5h, 0BC0196CEh, 0FF4CB42Eh, 07ACA6BE3h
  52.   dd  0A9ED2A5Ah, 06405A8F7h, 0AC00D4F8h, 0BDD1FC77h, 0064F9DC5h, 0F10AB737h
  53.   dd  0781293D3h, 08410C2D2h, 01C6587DBh, 07D8F8F0Fh, 0F3DCC4EAh, 0B965F99Fh
  54.   dd  09A0094D1h, 065976D1Ch, 009173DC1h, 08E38B992h, 084701D44h, 014F0E1B9h
  55.   dd  0E8A1EC5Fh, 01E925A12h, 0E77A0B5Bh, 0CDB5926Eh, 0D16260C8h, 0C917E806h
  56.   dd  0519076AAh, 07BF6C21Ch, 0808C0C90h, 03E93C7B8h, 0707D6EA0h, 0F1DB698Dh
  57.  
  58. flags   db 0        ; The carry flag for the SWB generator.
  59. congx   dd 1C3A128Fh    ; seed for x = 69069*x mod 2^32 congruential generator
  60.  
  61. ;<<< to here must be saved
  62.  
  63. tmpq    dq ?
  64. neg31   dw -31
  65. neg63   dw -63
  66. swbsize dw tmpq-swbstate    ; The number of bytes in the seed
  67.  
  68. conglo  equ word ptr congx
  69. conghi  equ word ptr congx+2
  70. tmpw1   equ word ptr tmpq
  71. tmpw2   equ word ptr tmpq+2
  72. tmpw3   equ word ptr tmpq+4
  73. tmpw4   equ word ptr tmpq+6
  74. tmpdlo  equ dword ptr tmpq
  75. tmpdhi  equ dword ptr tmpq+4
  76. shrglo  equ tmpw1
  77. shrghi  equ tmpw2
  78. shrgx   equ tmpdlo
  79.  
  80.